home *** CD-ROM | disk | FTP | other *** search
/ The Utilities Experience / The Utilities Experience - Volume 1.iso / software / graphics / h-m / ie / arexx / thicken.rexx < prev    next >
OS/2 REXX Batch file  |  1995-12-21  |  1KB  |  53 lines

  1. /*******************************/
  2. /* Image Engineer Macro script */
  3. /* by Simon Edwards            */
  4. /* 3/6/95                      */
  5. /*                             */
  6. /* This thickens the black or  */
  7. /* pixels in a Black and white */
  8. /* image                       */
  9. /*******************************/
  10.  
  11. Options results
  12. signal on error            /* Setup a place for errors to go */
  13.  
  14. if arg()==0 then exit
  15.  
  16. 'REQUEST "Pixels to thicken" "White|Black"'
  17. reply=RESULT
  18.  
  19. select
  20.     when reply=1 then do
  21.         'CONVOLVE' arg(1) '"IE:Convolves/ThickenWhite"'
  22.         end
  23.     when reply=0 then do
  24.         NEGATIVE arg(1)
  25.         negproject=RESULT
  26.         'CONVOLVE' negproject '"IE:Convolves/ThickenWhite"'
  27.         newproject=RESULT
  28.         CLOSE negproject
  29.         NEGATIVE newproject
  30.         CLOSE newproject
  31.         end
  32. end
  33.  
  34. exit
  35.  
  36. /*******************************************************************/
  37. /* This is where control goes when an error code is returned by IE */
  38. /* It puts up a message saying what happened and on which line     */
  39. /*******************************************************************/
  40. error:
  41. if RC=5 then do            /* Did the user just cancel us? */
  42.     IE_TO_FRONT
  43.     LAST_ERROR
  44.     'REQUEST "'||RESULT||'"'
  45.     exit
  46. end
  47. else do
  48.     IE_TO_FRONT
  49.     LAST_ERROR
  50.     'REQUEST "Error detected!!!'||D2C(10)||'Image Engineer error message is as follows'||D2C(10)||result||D2C(10)||'Script failed on line '||SIGL||'"' 'Doh!'
  51.     exit
  52. end
  53.